home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat7 / dksc.z / dksc
Encoding:
Text File  |  2002-10-03  |  15.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4. ddddkkkkssss((((7777MMMM))))                                                                ddddkkkkssss((((7777MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      dks - dksc (SCSI) disk driver
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////ddddeeeevvvv////ddddsssskkkk////ddddkkkkssss****
  13.      ////ddddeeeevvvv////rrrrddddsssskkkk////ddddkkkkssss****
  14.      ////ddddeeeevvvv////ddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn****////cccc****pppp****
  15.      ////ddddeeeevvvv////rrrrddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn****////cccc****pppp****
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      The ddddkkkksssscccc driver supports all disk types that use a SCSI command set.
  19.      This includes traditional parallel SCSI as well as Fibre Channel
  20.      Arbitrated Loop and Fibre Channel Fabric devices (devices connected
  21.      through a Fibre Channel switch).  Currently, 8 bit parallel SCSI (also
  22.      called narrow SCSI) allows up to seven SCSI drives attached per SCSI bus,
  23.      16 bit parallel SCSI (also called wide SCSI) allows 15 drives.  Fibre
  24.      Channel Arbitrated Loop (FC-AL) allows up to 125 drives (some
  25.      implementations limit the number to 110).  The maximum number addressable
  26.      through Fibre Channel Fabric has no theoretical limit.  However,
  27.      practical considerations do limit the number to 252 drives for current
  28.      adapters.  Each drive (a RAID controller is considered a "drive" for
  29.      these purposes) can support a number of logical units (luns).  The
  30.      current limit depends on the host adapter.  It varies from 8 to 255.
  31.      Each unit (or lun) can have up to 16 partitions in use, three of which
  32.      (8, 9, and 10) are special (see below).
  33.  
  34.      Disk devices are named according to the following formats (jaguar drives
  35.      are no longer supported):
  36.  
  37.      PPPPaaaarrrraaaalllllllleeeellll SSSSCCCCSSSSIIII aaaannnndddd FFFFCCCC----AAAALLLL
  38.  
  39.           ////ddddeeeevvvv////rrrrddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#{ssss_p_a_r_t_i_t_i_o_n#|vvvvhhhh|vvvvoooollll}
  40.           ////ddddeeeevvvv////rrrrddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#llll_l_u_n#{ssss_p_a_r_t_i_t_i_o_n#|vvvvhhhh|vvvvoooollll}
  41.           ////ddddeeeevvvv////ddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#{ssss_p_a_r_t_i_t_i_o_n#|vvvvoooollll}
  42.           ////ddddeeeevvvv////ddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#llll_l_u_n#{ssss_p_a_r_t_i_t_i_o_n#|vvvvoooollll}
  43.  
  44.  
  45.      FFFFiiiibbbbrrrreeee CCCChhhhaaaannnnnnnneeeellll FFFFaaaabbbbrrrriiiicccc
  46.  
  47.           ////ddddeeeevvvv////rrrrddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn_l_u_n#{ssss_p_a_r_t_i_t_i_o_n#|vvvvhhhh|vvvvoooollll}////cccc_c_o_n_t_r_o_l_l_e_r#pppp_p_o_r_t#
  48.           ////ddddeeeevvvv////ddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn_l_u_n#ssss_p_a_r_t_i_t_i_o_n#////cccc_c_o_n_t_r_o_l_l_e_r#pppp_p_o_r_t#
  49.  
  50.      Note that the Fabric device names always specify the _l_u_n#, even if it is
  51.      zero.  The rrrrddddsssskkkk devices use a raw interface to communicate with the disk,
  52.      while the ddddsssskkkk devices use a block interface.  The _c_o_n_t_r_o_l_l_e_r#, _d_r_i_v_e#,
  53.      and _l_u_n# are used to indicate SCSI controller number, target ID, and
  54.      logical unit number, respectively.  The _n_o_d_e_n_a_m_e and _p_o_r_t# are used to
  55.      indicate the Fibre Channel world wide name (WWN) and the device port
  56.      number (normal Fibre Channel disks have two ports).  ssss_p_a_r_t_i_t_i_o_n#, vvvvhhhh, and
  57.      vvvvoooollll indicate a partition of the disk.  The vvvvhhhh device is only found in the
  58.      rrrrddddsssskkkk directory, since it is normally used only for iiiiooooccccttttllll and raw access.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddkkkkssss((((7777MMMM))))                                                                ddddkkkkssss((((7777MMMM))))
  71.  
  72.  
  73.  
  74.      The standard partition allocation by Silicon Graphics has _r_o_o_t on
  75.      partition 0, _s_w_a_p on partition 1, and (optionally) /_u_s_r on partition 6.
  76.      Some systems, such as the Indy, are shipped from the factory with a
  77.      single filesystem on the system disk for ease of administration.  In this
  78.      case, partition 6 is not used.  Partition 7 (when present), normally maps
  79.      the entire _u_s_a_b_l_e portion of the disk (excluding the volume header).
  80.      Partition 8 (vvvvhhhh) maps the volume header (see _p_r_t_v_t_o_c(1M), _d_v_h_t_o_o_l(1M)).
  81.      Partition 10 (vvvvoooollll) maps the entire drive.  Partition 9 is reserved, but
  82.      is not used for disks with the ddddkkkksssscccc driver.
  83.  
  84.      In current releases, these devices are part of the hardware graph
  85.      hwgfs(4), and are created dynamically as the disk partitions are changed.
  86.      Therefore MMMMAAAAKKKKEEEEDDDDEEEEVVVV no longer needs to be run, nor does it need to be
  87.      modified to create additional partition devices.  The partitions will be
  88.      created/updated whenever a disk is opened, such as when a filesystem is
  89.      mounted, or when programs such as ffffxxxx((((1111MMMM)))) and pppprrrrttttvvvvttttoooocccc((((1111MMMM)))) access the disk.
  90.      For devices that are hot-plugged, the bus that they are plugged into must
  91.      be reprobed and reconfigured (see ssssccccssssiiiihhhhaaaa((((1111mmmm)))) and iiiiooooccccoooonnnnffffiiiigggg((((1111MMMM))))) in order
  92.      for the partitions to be created.
  93.  
  94.      For removable media devices, mmmmeeeeddddiiiiaaaadddd((((1111MMMM)))), if running, will cause these
  95.      updates to occur after media changes. In the absence of mediad, the user
  96.      will need to run code or execute commands that will cause an open against
  97.      the volume header. ffffxxxx((((1111MMMM)))) or pppprrrrttttvvvvttttoooocccc((((1111MMMM)))) are two examples of commands
  98.      that will do this, as well as the DDDDIIIIOOOOCCCCGGGGEEEETTTTVVVVHHHH iiiiooooccccttttllll (see below) issued by a
  99.      program.
  100.  
  101.      The standard configuration has /_d_e_v/_r_o_o_t linked to partition 0 of the
  102.      system disk, with /_d_e_v/_s_w_a_p linked to partition 1 of the system disk, and
  103.      /_d_e_v/_u_s_r linked to partition 6 of the system disk.  Systems that do not
  104.      use partition 6 as shipped, instead using just the s0 and s1 partitions,
  105.      still have a link made.  There is no attempt to make the link to the
  106.      device used for the ////uuuussssrrrr filesystem in the _f_s_t_a_b(4) file, if present,
  107.      even if it uses a different device.  Option disks normally use the s7
  108.      partition as a single filesystem, containing the whole usable portion of
  109.      the disk.
  110.  
  111. IIIIOOOOCCCCTTTTLLLL FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  112.      As well as normal read and write operations, the driver supports a number
  113.      of special _i_o_c_t_l(2) operations when opened via the character special file
  114.      in /_d_e_v/_r_d_s_k.  Command values for these are defined in the system include
  115.      file <_s_y_s/_d_k_i_o._h>, with data structures in <_s_y_s/_d_k_s_c._h>.
  116.      These _i_o_c_t_l operations are intended for the use of special-purpose disk
  117.      utilities.  Many of them can have drastic or even fatal effects on disk
  118.      operation if misused; they should be invoked only by the knowledgeable
  119.      and with extreme caution!
  120.  
  121.      A list of the _i_o_c_t_l commands supported by the _d_k_s driver is given below.
  122.  
  123.      DIOCADDBB
  124.           Adds a block to the badblock list.  The argument is the logical
  125.           block number (not a pointer) on the drive.  For some makes of
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ddddkkkkssss((((7777MMMM))))                                                                ddddkkkkssss((((7777MMMM))))
  137.  
  138.  
  139.  
  140.           drives, the spared block must be written before the sparing takes
  141.           effect.  Only programs running with superuser permissions can use
  142.           this ioctl.
  143.  
  144.      DIOCDRIVETYPE
  145.           The first SSSSCCCCSSSSIIII____DDDDEEEEVVVVIIIICCCCEEEE____NNNNAAAAMMMMEEEE____SSSSIIIIZZZZEEEE bytes (currently 28) of the SCSI
  146.           inquiry data for the drive is returned to the caller.  The argument
  147.           is a pointer to a char array of at least this size.  This contains
  148.           vendor and drive specific information such as the drive name and
  149.           model number.  See a SCSI command specification for details on the
  150.           structure of this buffer.
  151.  
  152.      DIOCFORMAT
  153.           Formats the entire drive.  Any information on the drive is lost.
  154.           The grown defect list (blocks spared with DIOCADDBB) is empty after
  155.           formatting is complete, blocks previously in the grown defect list
  156.           are no longer spared.
  157.  
  158.      DIOCGETVH
  159.           Reads the disk volume header from the driver into a buffer in the
  160.           calling program.  The argument in the ioctl call must point to a
  161.           buffer of size at least 512 bytes.  The structure of the volume
  162.           header is defined in the include file <_s_y_s/_d_v_h._h>.  The
  163.           corresponding call DIOCSETVH sets the drivers idea of the volume
  164.           header; in particular, the drivers idea of the partition sizes and
  165.           offsets is changed.
  166.  
  167.      DIOCPREVREM
  168.           Issues a PREVENT ALLOW MEDIA REMOVAL command to the opened device.
  169.           The first bit of the arg is or'd into byte 4 of the SCSI command.
  170.           See a SCSI command specification for details on this command.
  171.  
  172.      DIOCRDEFECTS
  173.           The argument is a pointer to a struct dk_ioctl_data.  The i_addr
  174.           field points to a structure like:
  175.  
  176.  
  177.                structure defect_list {
  178.                     struct defect_header defhdr;
  179.                     struct defect_entry defentry[NENTS];
  180.                };
  181.  
  182.           The i_len field is set to the total length of the structure, which
  183.           must be less than NBPP from <_s_y_s/_p_a_r_a_m._h>; at most NENTS defects are
  184.           returned.  The actual number of defects can be determined by
  185.           examining the defhdr.defect_listlen value, which is the number of
  186.           bytes returned.  This must be divided by the size of the applicable
  187.           data structure for the type requested.  The i_page field should be
  188.           set to the bits identifying the badblock reporting type.  These bits
  189.           request the combination of manufacturer's and grown defects; and one
  190.           of bytes from index, physical cyl/head/sec, vendor unique.  The only
  191.           combination that works with all currently supported SCSI disks is
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ddddkkkkssss((((7777MMMM))))                                                                ddddkkkkssss((((7777MMMM))))
  203.  
  204.  
  205.  
  206.           type cyl/head/sec; and either combined manufacturer's and grown
  207.           defects, or just manufacturer's defects.
  208.  
  209.      DIOCREADCAPACITY
  210.           The arg is a pointer to an unsigned integer.  The value returned is
  211.           the number of usable sectors on the drive (as read from the drive).
  212.  
  213.      DIOCSCSIINQ
  214.           The arg is a pointer to a char array at least SCSI_INQUIRY_LEN bytes
  215.           long.  The SCSI inquiry data from the device is copied to this
  216.           buffer.  See a SCSI command specification for details on the
  217.           structure of this buffer.
  218.  
  219.      DIOCSENSE / DIOCSELECT
  220.           The argument is a pointer to a struct dk_ioctl_data.  This allows
  221.           sending SELECT and SENSE commands to the drive.  See the ANSI SCSI
  222.           specification and individual manufacturer's manuals for allowed page
  223.           numbers and valid values.  Only programs running with superuser
  224.           permissions can use the DIOCSELECT ioctl.
  225.  
  226.      DIOCSTARTSTOP
  227.           This command issues a SCSI STARTSTOP command to the opened device.
  228.           The first two bits of the arg are or'd into byte 4 of the SCSI
  229.           command.  See a SCSI command specification for details on this
  230.           command.
  231.  
  232.      DIOCTEST
  233.           issues the SCSI "Send Diagnostic" command to the drive.  The exact
  234.           tests done are manufacturer specific.  The _i_o_c_t_l call returns 0 upon
  235.           success, or sets _e_r_r_n_o to EIO and returns -1 upon failure.
  236.  
  237. NNNNOOOOTTTTEEEESSSS
  238.      Fibre Channel fabric device names are meant to separate three concepts;
  239.      device specification, portion of device, and path to device.  Thus the
  240.      _n_o_d_e_n_a_m_e specifies a unique device, such as a disk drive or a RAID
  241.      controller.  The _l_u_n# and _p_a_r_t_i_t_i_o_n# specify which portion of the disk or
  242.      RAID is accesses, and the _c_o_n_t_r_o_l_l_e_r# and _p_o_r_t# specify the path the data
  243.      and commands travel to and from the device.  The port number will usually
  244.      be something that represents the difference between the 64 bit world wide
  245.      node name and the 64 bit world wide port name.  For non-SGI devices, and
  246.      some SGI devices that were released after a given release of IRIX, the
  247.      driver may not be able to determine a short port number.  In such cases,
  248.      the port number will be the 64 bit world wide port name.
  249.  
  250. FFFFIIIILLLLEEEESSSS
  251.      /dev/dsk/dks*
  252.      /dev/rdsk/dks*
  253.      /dev/dsk/*/lun*/c*p*
  254.      /dev/rdsk/*/lun*/c*p*
  255.      /dev/root
  256.      /dev/usr
  257.      /dev/swap
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ddddkkkkssss((((7777MMMM))))                                                                ddddkkkkssss((((7777MMMM))))
  269.  
  270.  
  271.  
  272. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  273.      dvhtool(1M), fx(1M), prtvtoc(1M), scsiha(1M), ioconfig(1M).
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.